home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15516 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.cern.ch!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Defeat password by C
  5. Date: 19 Apr 96 15:34:55 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.829928095@news.cern.ch>
  8. References: <4l4cns$gs0@usenetp1.news.prodigy.com> <4l4n57INNb5g@keats.ugrad.cs.ubc.ca> <4l8832$9jb@abel.cc.sunysb.edu>
  9. NNTP-Posting-Host: hpplus01.cern.ch
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. X-Newsreader: NN version 6.5.0 #18 (NOV)
  14.  
  15. In <4l8832$9jb@abel.cc.sunysb.edu> dkat@psych1.psy.sunysb.edu (DK) writes:
  16.  
  17. >c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) wrote:
  18. >
  19. >>In article <4l4cns$gs0@usenetp1.news.prodigy.com>,
  20. >>Bubba Meigs <VRLL67A@prodigy.com> wrote:
  21. >>>I am a student who trying to learn how to program C++.
  22. >>>I just wonder if anyone know how to write a program by C++ to break the 
  23. >>>password.
  24. >
  25. >>main()
  26. >>{
  27. >>    char pass[] = "mylamepassword";
  28. >
  29. >>    pass[8] = 0;
  30.  
  31. >/* do you mean pass[8] = '\0'; ?
  32.  
  33. I'm afraid I'm completely clueless here.  Pray tell, what is the difference
  34. between 0 and '\0' in C (not C++)???
  35.  
  36. >if so why?
  37.  
  38. To break the password, obviously :-)  The joke makes sense even without the
  39. Unix-specific pun.  That is, assuming a non-humour impaired reader.
  40.  
  41. >if not what does this do?
  42.  
  43. See above.
  44.  
  45. >DK -  opps - this is a reference to c++ which I know not.  I
  46. >thought we were doing good old C*.
  47.  
  48. I'm afraid you were wrong.  We were doing the good old C, not the good old
  49. C*.
  50.  
  51. >Still the questions remain and are sincere  DK*/
  52.  
  53. Sincerity is not a good substitute for either C knowledge (see the 0 vs '\0'
  54. bit) or sense of humour.
  55.  
  56. Dan :-)
  57. --
  58. Dan Pop
  59. CERN, CN Division
  60. Email: danpop@mail.cern.ch 
  61. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  62.